import {request} from './request'

// 取分类数据
export function getCategory() {
    return request({
        url: '/api/goods'
    })
}

// 按分类ID和排序取商品数据
export function getCategoryGoods(order = 'sales', cid = 0, page = 1,) {
    return request({
        url: `/api/goods?category_id=${cid}&page=${page}&${order}=1`
    })
}
